3.632 \(\int \cos ^3(c+d x) (a+b \sin (c+d x))^m \, dx\)

Optimal. Leaf size=92 \[ -\frac{\left (a^2-b^2\right ) (a+b \sin (c+d x))^{m+1}}{b^3 d (m+1)}+\frac{2 a (a+b \sin (c+d x))^{m+2}}{b^3 d (m+2)}-\frac{(a+b \sin (c+d x))^{m+3}}{b^3 d (m+3)} \]

[Out]

-(((a^2 - b^2)*(a + b*Sin[c + d*x])^(1 + m))/(b^3*d*(1 + m))) + (2*a*(a + b*Sin[c + d*x])^(2 + m))/(b^3*d*(2 +
 m)) - (a + b*Sin[c + d*x])^(3 + m)/(b^3*d*(3 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.0719789, antiderivative size = 92, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {2668, 697} \[ -\frac{\left (a^2-b^2\right ) (a+b \sin (c+d x))^{m+1}}{b^3 d (m+1)}+\frac{2 a (a+b \sin (c+d x))^{m+2}}{b^3 d (m+2)}-\frac{(a+b \sin (c+d x))^{m+3}}{b^3 d (m+3)} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Sin[c + d*x])^m,x]

[Out]

-(((a^2 - b^2)*(a + b*Sin[c + d*x])^(1 + m))/(b^3*d*(1 + m))) + (2*a*(a + b*Sin[c + d*x])^(2 + m))/(b^3*d*(2 +
 m)) - (a + b*Sin[c + d*x])^(3 + m)/(b^3*d*(3 + m))

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \cos ^3(c+d x) (a+b \sin (c+d x))^m \, dx &=\frac{\operatorname{Subst}\left (\int (a+x)^m \left (b^2-x^2\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\left (-a^2+b^2\right ) (a+x)^m+2 a (a+x)^{1+m}-(a+x)^{2+m}\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=-\frac{\left (a^2-b^2\right ) (a+b \sin (c+d x))^{1+m}}{b^3 d (1+m)}+\frac{2 a (a+b \sin (c+d x))^{2+m}}{b^3 d (2+m)}-\frac{(a+b \sin (c+d x))^{3+m}}{b^3 d (3+m)}\\ \end{align*}

Mathematica [A]  time = 0.263323, size = 74, normalized size = 0.8 \[ \frac{(a+b \sin (c+d x))^{m+1} \left (\frac{b^2-a^2}{m+1}-\frac{(a+b \sin (c+d x))^2}{m+3}+\frac{2 a (a+b \sin (c+d x))}{m+2}\right )}{b^3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Sin[c + d*x])^m,x]

[Out]

((a + b*Sin[c + d*x])^(1 + m)*((-a^2 + b^2)/(1 + m) + (2*a*(a + b*Sin[c + d*x]))/(2 + m) - (a + b*Sin[c + d*x]
)^2/(3 + m)))/(b^3*d)

________________________________________________________________________________________

Maple [F]  time = 0.204, size = 0, normalized size = 0. \begin{align*} \int \left ( \cos \left ( dx+c \right ) \right ) ^{3} \left ( a+b\sin \left ( dx+c \right ) \right ) ^{m}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*sin(d*x+c))^m,x)

[Out]

int(cos(d*x+c)^3*(a+b*sin(d*x+c))^m,x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sin(d*x+c))^m,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.44343, size = 311, normalized size = 3.38 \begin{align*} \frac{{\left (4 \, a b^{2} m - 2 \, a^{3} + 6 \, a b^{2} +{\left (a b^{2} m^{2} + a b^{2} m\right )} \cos \left (d x + c\right )^{2} +{\left (4 \, b^{3} +{\left (b^{3} m^{2} + 3 \, b^{3} m + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2} + 2 \,{\left (a^{2} b + b^{3}\right )} m\right )} \sin \left (d x + c\right )\right )}{\left (b \sin \left (d x + c\right ) + a\right )}^{m}}{b^{3} d m^{3} + 6 \, b^{3} d m^{2} + 11 \, b^{3} d m + 6 \, b^{3} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sin(d*x+c))^m,x, algorithm="fricas")

[Out]

(4*a*b^2*m - 2*a^3 + 6*a*b^2 + (a*b^2*m^2 + a*b^2*m)*cos(d*x + c)^2 + (4*b^3 + (b^3*m^2 + 3*b^3*m + 2*b^3)*cos
(d*x + c)^2 + 2*(a^2*b + b^3)*m)*sin(d*x + c))*(b*sin(d*x + c) + a)^m/(b^3*d*m^3 + 6*b^3*d*m^2 + 11*b^3*d*m +
6*b^3*d)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*sin(d*x+c))**m,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.1189, size = 504, normalized size = 5.48 \begin{align*} -\frac{{\left (b \sin \left (d x + c\right ) + a\right )}^{3}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} m^{2} - 2 \,{\left (b \sin \left (d x + c\right ) + a\right )}^{2}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} a m^{2} +{\left (b \sin \left (d x + c\right ) + a\right )}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} a^{2} m^{2} -{\left (b \sin \left (d x + c\right ) + a\right )}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} b^{2} m^{2} + 3 \,{\left (b \sin \left (d x + c\right ) + a\right )}^{3}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} m - 8 \,{\left (b \sin \left (d x + c\right ) + a\right )}^{2}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} a m + 5 \,{\left (b \sin \left (d x + c\right ) + a\right )}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} a^{2} m - 5 \,{\left (b \sin \left (d x + c\right ) + a\right )}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} b^{2} m + 2 \,{\left (b \sin \left (d x + c\right ) + a\right )}^{3}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} - 6 \,{\left (b \sin \left (d x + c\right ) + a\right )}^{2}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} a + 6 \,{\left (b \sin \left (d x + c\right ) + a\right )}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} a^{2} - 6 \,{\left (b \sin \left (d x + c\right ) + a\right )}{\left (b \sin \left (d x + c\right ) + a\right )}^{m} b^{2}}{{\left (b^{2} m^{3} + 6 \, b^{2} m^{2} + 11 \, b^{2} m + 6 \, b^{2}\right )} b d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sin(d*x+c))^m,x, algorithm="giac")

[Out]

-((b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*m^2 - 2*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a*m^2 +
(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*a^2*m^2 - (b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*b^2*m^2 + 3*
(b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*m - 8*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a*m + 5*(b*s
in(d*x + c) + a)*(b*sin(d*x + c) + a)^m*a^2*m - 5*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*b^2*m + 2*(b*sin
(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m - 6*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a + 6*(b*sin(d*x + c
) + a)*(b*sin(d*x + c) + a)^m*a^2 - 6*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*b^2)/((b^2*m^3 + 6*b^2*m^2 +
 11*b^2*m + 6*b^2)*b*d)